<% layout('/layouts/default.html', {title: '学员信息表管理', libs: ['validate']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${smStudent.isNewRecord ? '新增学员信息表' : '编辑学员信息表'}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${smStudent}" action="${ctx}/sm/smStudent/save" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="form-unit">学员信息</div>
				<#form:hidden path="id"/>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 学员编号：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="stuno" maxlength="16" readOnly="readOnly" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 报考类型：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="studyType" dictType="DSMS_BKLX" blankOption="true" class="form-control required" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 姓名：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="name" maxlength="100" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 性别：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="sex" dictType="sys_user_sex" blankOption="true" class="form-control required" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 证件类型：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="cardType" dictType="DSMS_ZJLX" blankOption="true" class="form-control required" />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 证件号：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="idno" maxlength="50" class="form-control required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 出生日期：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="birthDate" readonly="true" maxlength="20" class="form-control Wdate"
								dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 籍贯：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="nativePlace" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 户口所在地：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="regPlace" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 住址：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="address" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 联系电话：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="telephone" maxlength="20" class="form-control required phone"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 是否本校：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="isSchool" dictType="sys_yes_no" blankOption="true" class="form-control required" />
							</div>
						</div>
					</div>
				</div>

				<div class="form-unit">驾校信息</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 所属驾校：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:treeselect id="officeId" title="驾校"
									path="officeId" labelPath="school.officeName"
									url="${ctx}/sys/office/treeData"
									class=" required" allowClear="true"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 教练车：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:listselect path="useCar" labelPath="car.carNo" id="useCarSelect" title="车辆"
								url="${ctx}/cm/smCars/carSelect" allowClear="false"
								checkbox="false" itemCode="id" itemName="carNo"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 教练员：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:listselect path="teacher" labelPath="driveTeacher.name" id="teacherSelect" title="教练"
								url="${ctx}/dtm/smDriveTeacher/teacherSelect" allowClear="false"
								checkbox="false" itemCode="id" itemName="name"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 学车时间：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="studyTime" readonly="true" maxlength="20" class="form-control Wdate date"
								dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</div>

				<div class="form-unit">受理信息</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 报名时间：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="signupTime"  readOnly="readOnly" maxlength="20" class="form-control Wdate"
								dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 受理人：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:treeselect id="employeeId" title="受理人"
									path="employeeId" labelPath="acceptor.userName"
									url="${ctx}/sys/office/treeData?isLoadUser=true"
									class=" required" allowClear="true"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 已缴学费：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="payFee" class="form-control required digits"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 剩余学费：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="oweFee" class="form-control required digits"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 收费标准：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="fee" class="form-control required digits"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 缴费情况：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="payInfo" dictType="DSMS_JFQK" blankOption="true" class="form-control required" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> 是否VIP：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="isVip" dictType="sys_yes_no" blankOption="true" class="form-control required" />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 备注：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="remarks" maxlength="64" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('sm:smStudent:edit')){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});
</script>